<template>
  <div v-if="question">
    <el-form label-width="60px" size="mini">
      <edit-common-module :question="question"></edit-common-module>
      <el-form-item label="样式：">
        <el-radio-group v-model="question.style">
          <el-radio label="date">日期</el-radio>
          <el-radio label="time">时间</el-radio>
          <el-radio label="datetime">日期时间</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="提示：">
        <el-input v-model="question.placeholder" placeholder="输入框提示"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">保存</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
  import EditCommonModule from "./commonModule";

  export default {
    components: { EditCommonModule },
    name: "edit-i-datetime",
    props: ['page','question'],
    created(){
      if(!this.question.style)
        this.question.style='datetime'
    },
    methods:{
      onSubmit(){
        this.$emit('edit',this.question)
      }
    }
  }
</script>

<style lang="scss">

</style>
